package com.atguigu.springcloud.entities;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.ToString;

/**
 * @author 赵雨强
 * @create 2021/4/30 6:18
 */
@Data
@ToString
@AllArgsConstructor
@NoArgsConstructor
public class CommonResult<T> {
    private Integer code;
    private String message;
    private T data;


    /**
     * 两个参数的构造器
     * @param code 约定状态
     * @param message 返回的信息
     */
    public CommonResult(Integer code, String message){
        this(code, message, null);
    }
}
